{template 'tpl_header'}

{if !empty($thumbs)}
<div class="swiper-container">
    <div class="swiper-wrapper">
        {loop $thumbs $index $thumb}
        <div class="swiper-slide">
            <img src="{php echo tomedia($thumb);}"/>
        </div>
        {/loop}
    </div>
    <div class="swiper-pagination"></div>
</div>
{/if}

<div class="btn_space_area">
    <a href="javascript:;" class="weui-btn weui-btn_mini weui-btn_primary">单品 ( {$single_count} )</a>
    <a href="javascript:;" class="weui-btn weui-btn_mini weui-btn_default">线路 ( 0 )</a>
</div>

{if !empty($singles)}
{loop $singles $index $single}
    {if $index%2 == '0'}
    <div class="weui-flex weui-flex__col2">
    {/if}

    <a href="{php echo $this->createMobileUrl('single',array('id'=>$single['id']));}"
       class="weui-flex__item weui-flex__col2__style2">
        <img src="{php echo tomedia($single['thumb']);}">
        <div class="weui-flex__col2__style2__place">
            <span>{$single['tag']}</span>
        </div>
        <div class="weui-flex__col2__style2__title">
            <span>{$single['name']}</span>
        </div>
        <div class="weui-flex__col2__style2__price">
            <span>每人￥{$single['price']}</span>
        </div>
    </a>

    {if $index%2 == '0' && $index + 1 == $single_count}
    <a href="#" class="weui-flex__item"></a>
    {/if}

    {if $index%2 == '1' || $index + 1 == $single_count}
    </div>
    {/if}
{/loop}
{/if}

<div class="weui-whitespace weui-whitespace__xl"></div>

{template 'tpl_footer'}

<script src="{MOBILE_RES}js/swiper.min.js"></script>
<script>
    $(function () {
        $(".swiper-container").swiper({
            loop: true,
            autoplay: 3000
        });
    });
</script>